package com.ujiuye.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ujiuye.mapper.MenuMapper;
import com.ujiuye.pojo.Menu;
import com.ujiuye.service.IMenuService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;


/**
 * <p>
 * 菜单 服务实现类
 * </p>
 *
 * @author zhangwenping
 * @since 2021-07-05
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {

    @Resource
    private MenuMapper menuMapper;

    @Override
    public Menu getByName(String name) {
        QueryWrapper<Menu> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("name",name);
        return menuMapper.selectOne(queryWrapper);
    }
}
